<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>addcart</title>
    <link rel="stylesheet" th:href="@{css/cart.css}">
</head>
<body class="bodycart">
<div>
    <button class="addcartbtn">添加</button>
</div>
<div class="addcartForm" style="display: none">
    <form>
        <div>
            <input type="text" class="cartId" name="cartId" placeholder="分类id">
        </div>
        <div>
            <input type="text" class="name" name="name" placeholder="分类名称">
        </div>
        <div>
            <button class="addcartFormbtn">确定</button>
            <button class="retaddcartbtn">返回</button>
        </div>
    </form>
</div>

<!--//显示分类-->
<div class="carttable">
    <table>
        <thead>
        <tr>
            <th>分类id</th>
            <th>分类名称</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="cart:${carts}">
            <td class="cartId" th:text="${cart.cartId}"></td>
            <td class="name" th:text="${cart.name}"></td>
            <td>
                <button class="modcart" th:data-id="${cart.cartId}">修改</button>
                <button class="delcart" th:data-id="${cart.cartId}">删除</button>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<div class="modcartplace" style="display: none">
    <iframe align="center" width="100%" height="500px"
            src="#" class="cartIframe"
            frameborder="no" border="0" marginwidth="0" marginheight="0"
            scrolling="no"></iframe>
</div>
<script type="text/javascript" th:src="@{jquery-3.5.0.min.js}"></script>
<script type="text/javascript" th:src="@{js/cart.js}"></script>
</body>
</html>